﻿@{
    ViewBag.Title = "Home Page";
}

<h1>Sample Saml2 Owin Authentication Application</h1>
<p>
    This is a sample Owin application for Saml2 authentication using the MVC Owin Middleware with ASP.NET Identity.
</p>

@if (!User.Identity.IsAuthenticated)
{
    <p>
        You are currently <span id="status">not signed in</span>.
    </p>
}
else
{
    <p>
        You are <span id="status">signed in</span>.
    </p>
    <table>
        <thead>
            <tr>
                <th>Claim Type</th>
                <th>Claim Value</th>
                <th>Issuer</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var c in System.Security.Claims.ClaimsPrincipal.Current.Claims)
            {
                <tr>
                    <td>@c.Type</td>
                    <td>@c.Value</td>
                    <td>@c.Issuer</td>
                </tr>
            }
        </tbody>
    </table>
}

<a href="@Url.Content("~/Saml2")">Service Provider Metadata</a>
